﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CustomTextBoxTestWebApplication.Default" %>
<%@ Register Namespace="CustomTextbox" Assembly="CustomTextbox" TagPrefix="ukc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Watermark Textbox Demo</title>
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <ukc:ScriptManager runat="server" ID="ScriptManager1" />

    <script type="text/javascript">

        // Page Validation Script
        $(document).ready(function () {

            $('.requiredTextBox').blur(function () {
                Page_ClientValidate();
                if (Page_IsValid) {
                    $('#btnSubmit').removeAttr("disabled");
                }
                else {
                    $('#btnSubmit').attr("disabled", "true");
                }
            });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ukc:WatermarkTextbox ID="txtFirstName" runat="server" WatermarkText="Enter Firstname here" IsRequiredField="true" /> <br />
        <ukc:WatermarkTextbox ID="txtLastName" runat="server" WatermarkText="Enter Lastname here" IsRequiredField="true" /> <br />
        <ukc:WatermarkTextbox ID="txtDescription" runat="server" TextMode="MultiLine" WatermarkText="Enter Description here" /><br />

        <asp:Button ID="btnSubmit" runat="server" Text="Submit" Enabled="false" />


    </div>
    </form>
</body>
</html>
